home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-10-06 | 3.8 KB | 194 lines | [TEXT/CWIE] |
- ///--------------------------------------------------------------------------------------
- // SpriteWorldUtils.h
- //
- // Portions are copyright: © 1991-94 Tony Myles, All rights reserved worldwide.
- //
- // Description: constants, structures, and prototypes for sprite utilities
- ///--------------------------------------------------------------------------------------
-
-
- #ifndef __SPRITEWORLDUTILS__
- #define __SPRITEWORLDUTILS__
-
- #ifndef __QUICKDRAW__
- #include <QuickDraw.h>
- #endif
-
- #ifndef __ICONS__
- #include <Icons.h>
- #endif
-
- #ifndef __QDOFFSCREEN__
- #include <QDOffscreen.h>
- #endif
-
- #ifndef __SWCOMMON__
- #include <SWCommonHeaders.h>
- #endif
-
- #ifndef __SPRITEWORLD__
- #include <SpriteWorld.h>
- #endif
-
- #ifndef __SPRITELAYER__
- #include <SpriteLayer.h>
- #endif
-
- #ifndef __SPRITE__
- #include <Sprite.h>
- #endif
-
- #ifndef __SPRITEFRAME__
- #include <SpriteFrame.h>
- #endif
-
-
- enum
- {
- kColorIconResType = 'cicn'
- };
-
- #ifndef NewColorSearchProc
- #define NewColorSearchProc(x) (x)
- #endif
-
- ///--------------------------------------------------------------------------------------
- // sprite utilities function prototypes
- ///--------------------------------------------------------------------------------------
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- extern RGBColor gSWTransparentColor;
-
- SW_FUNC OSErr SWCreateRegionFromCIconMask(
- RgnHandle *maskRgn,
- CIconHandle cIconH);
- /*
- SW_FUNC OSErr SWCreateRegionFromPict(
- RgnHandle *pictRgnH,
- PicHandle srcPictH);
- */
- SW_FUNC OSErr SWCreateRegionFromPictResource(
- RgnHandle *pictRgnH,
- short pictResID);
-
- SW_FUNC OSErr SWGetCIcon(
- CIconHandle* cIconH,
- short iconResID);
-
- SW_FUNC OSErr SWCreateRegionFromGWorldAndRect(
- RgnHandle *maskRgn,
- GWorldPtr maskGWorld,
- Rect* frameRect);
-
- SW_FUNC OSErr SWCreateRegionFromGWorldAndRectStart(
- GWorldPtr *tempMaskGWorld,
- short maxWidth,
- short maxHeight);
-
- SW_FUNC void SWCreateRegionFromGWorldAndRectFinish(
- GWorldPtr tempMaskGWorld);
-
- SW_FUNC OSErr SWCreateRegionFromGWorldAndRectPartial(
- RgnHandle *maskRgn,
- GWorldPtr maskGWorld,
- GWorldPtr tempMaskGWorld,
- Rect* frameRect);
-
- SW_FUNC OSErr SWCreateGWorldFromPictResource(
- SpriteWorldPtr destSpriteWorld,
- GWorldPtr *pictGWorldP,
- short pictResID);
-
- SW_FUNC OSErr SWCreateGWorldFromPict(
- SpriteWorldPtr destSpriteWorld,
- GWorldPtr *pictGWorld,
- PicHandle srcPictH);
-
- SW_FUNC OSErr SWCreateGWorldFromCIconMask(
- SpriteWorldPtr destSpriteWorld,
- GWorldPtr *maskGWorldP,
- CIconHandle cIconH);
-
- SW_FUNC void SWInvertGWorld(
- GWorldPtr gWorldP);
-
- SW_FUNC void SWInvertRect(
- GWorldPtr gWorldP,
- RectPtr rectP);
-
- SW_FUNC void SWCopyGWorlds(
- GWorldPtr srcGWorldP,
- GWorldPtr dstGWorldP );
-
- SW_FUNC void SWFlipPixelsHorizontally(
- GWorldPtr dstGWorldP,
- RectPtr rectP);
-
- SW_FUNC void SWFlipPixelsVertically(
- GWorldPtr dstGWorldP,
- RectPtr rectP);
-
- SW_FUNC void SWSetTransparentColor(
- RGBColor *RGB);
-
- SW_FUNC OSErr SWCreatePixelMaskFromGWorld(
- GWorldPtr pictureGWorld,
- GWorldPtr maskGWorld,
- RectPtr rectP );
-
- SW_FUNC OSErr SWCreateRegionMaskFromGWorld(
- GWorldPtr pictureGWorld,
- Rect *pictureRect,
- RgnHandle maskRegion );
-
- SW_FUNC OSErr SWFixImageGWorld(
- GWorldPtr pictureGWorld,
- GWorldPtr maskGWorld,
- RectPtr rectP );
-
- SW_FUNC OSErr SWCreateMaskAndFixImage(
- GWorldPtr pictureGWorld,
- GWorldPtr maskGWorld,
- RectPtr rectP );
-
- SW_FUNC OSErr SWBlackenGWorld(
- GWorldPtr oldGWorld );
-
- SW_FUNC OSErr SWWhitenGWorld(
- GWorldPtr oldGWorld );
-
- SW_FUNC OSErr SWFastWhitenGWorld(
- GWorldPtr pictureGWorld );
-
- SW_FUNC void SWClearStickyError(void);
-
- SW_FUNC OSErr SWStickyError(void);
-
- SW_FUNC void SWSetStickyIfError(
- OSErr errNum);
-
- SW_FUNC Boolean SWHasSystem7(void);
-
- SW_FUNC OSErr SWGetProcessorType(short *processorType);
-
- void SWAssertFail(char* filename, int lineNum);
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif /* __SPRITEWORLDUTILS__ */
-
-